home *** CD-ROM | disk | FTP | other *** search
/ United Public Domain Gold 2 / United Public Domain Gold 2.iso / utilities / pu250.dms / pu250.adf / Graphics / BOBs / Example9.h < prev    next >
Text File  |  1992-04-07  |  3KB  |  79 lines

  1. /***********************************************************/
  2. /*                                                         */
  3. /* Amiga C Encyclopedia (ACE) V3.0      Amiga C Club (ACC) */
  4. /* -------------------------------      ------------------ */
  5. /*                                                         */
  6. /* Book:    ACM Graphics                Amiga C Club       */
  7. /* Chapter: BOBs                        Tulevagen 22       */
  8. /* File:    Example9.c                  181 41  LIDINGO    */
  9. /* Author:  Anders Bjerin               SWEDEN             */
  10. /* Date:    92-04-07                                       */
  11. /* Version: 1.00                                           */
  12. /*                                                         */
  13. /*   Copyright 1992, Anders Bjerin - Amiga C Club (ACC)    */
  14. /*                                                         */
  15. /* Registered members may use this program freely in their */
  16. /*     own commercial/noncommercial programs/articles.     */
  17. /*                                                         */
  18. /***********************************************************/
  19.  
  20.  
  21.  
  22. /* The display: */
  23. #define DISPLAY_WIDTH    320 /* The display width.         */
  24. #define DISPLAY_HEIGHT   200 /* The height of the display. */
  25. #define DISPLAY_DEPTH      4 /* 4 bitplanes, 16 colours.   */
  26. #define DISPLAY_MODES   NULL /* Low resolution screen.     */
  27.  
  28. /* Center of the display: */
  29. #define CX          (DISPLAY_WIDTH>>1)
  30. #define CY          (DISPLAY_HEIGHT>>1)
  31.  
  32. /* The Sun: */
  33. #define SUN_MASK_SIZE  123
  34. #define SUN_WIDTH       41
  35. #define SUN_WORDS_WIDE   3
  36. #define SUN_HEIGHT      41
  37. #define SUN_DEPTH        3
  38.  
  39. /* Position of the Sun: */
  40. #define SUN_X          CX-(SUN_WIDTH>>1)
  41. #define SUN_Y          CY-(SUN_HEIGHT>>1)
  42.  
  43. /* The Planet: */
  44. #define NR_OF_PLANETS       13
  45. #define PLANET_MASK_SIZE   105
  46. #define PLANET_WIDTH        35
  47. #define PLANET_WORDS_WIDE    3
  48. #define PLANET_HEIGHT       35
  49. #define PLANET_DEPTH         3
  50.  
  51. /* Startposition of the planet: */
  52. #define PLANET_X            20
  53. #define PLANET_Y            CY
  54.  
  55. /* The planets acceleration: */
  56. #define ACCELERATION 0.1
  57.  
  58. /* The "range" limits: */
  59. #define LIM0  18
  60. #define LIM1  54
  61. #define LIM2  85
  62. #define LIM3 111
  63. #define LIM4 129
  64. #define LIM5 139
  65.  
  66. /* The colour "ranges". (When we should start  */
  67. /* to increase and decrease the colour values: */
  68. #define A1   20
  69. #define A2   61
  70. #define A3  160
  71. #define A4  259
  72. #define A5  300
  73.  
  74. /* How much the red colour may vary: */
  75. #define RED_VARIATION 5
  76.  
  77. /* The minimum red value: */
  78. #define MIN_RED       5
  79.